<?php

namespace app\model;

use think\Model;

class StoreCate extends Model
{

    protected $connection = 'mysql';
    protected $pk = 'id';
    protected $name = 'store_cate';

    public static function getpcarray()
    {
        $data = self::where(['weid' => weid(), 'status'=>1])->order('id desc')->select()->toArray();
        $datalist = [];
        foreach ($data as $key => $vo) {
            $datalist[$key]['val'] = $vo['id'];
            $datalist[$key]['key'] = $vo['title'];
        }
        return $datalist;
    }


}